import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 订单查询
export const queryInvoiceRegister = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange`, {
  params
});

// 供应商
export const customerDetail = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/queryCustomer`, {
  params
});
// 登记
export const SaveInvoiceRegister = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange`,
  params
);
// 税率
export const queryTax = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/getTax`, {
  params
});

// 登记金额
export const registerMoney = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/registerMoney`, {
  params
});

// 登记明细
export const queryDetail = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/queryDetail`, {
  params
});

// 取消登记
export const cancelDetail = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/cancelDetail`,
  params
);

// 登记导出
export const excel = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/excel`, {
  params,
  responseType: 'arraybuffer'
});

// 明细导出
export const excelDetail = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/QueryIsPayoffMange/excelDetail`, {
  params,
  responseType: 'arraybuffer'
});
